<%@ page language="java" import="control.database.*" pageEncoding="gb2312"%>

<%


Tunit1 tunit1 = new Tunit1();

System.out.println("1111111");

tunit1.setSuntid(request.getParameter("txtSuntid").toString());

tunit1.setSuntname(new String(request.getParameter("txtSuntname").getBytes("ISO8859_1")));

//unit.setSunttype(request.getParameter("selSunttype").toString().trim());
tunit1.setSuntcategory(request.getParameter("selSuntcategory").toString());

//unit.setSdptid(request.getParameter("selSdptname").toString().trim());
System.out.println(request.getParameter("txtsunttradesman"));
tunit1.setSunttradesman(new String(request.getParameter("txtsunttradesman").getBytes("ISO8859_1")));
//unit.setSinstalltime(request.getParameter("txtSinstalltime").toString());
//tunit1.setStrSuntid(request.getParameter("strSuntid").toString());
System.out.println("00000");
//System.out.println(request.getParameter("selSdptname").toString().trim().length());

String sql = tunit1.tunit1_Update();

//String sql1 = tunit1.tunit1_Update();

System.out.println("----------"+sql);


try
{
DataBase db = new DataBase();
db.executeUpdate(sql);
db.closeStmt();
//db.executeUpdate(sql1);
//db.closeStmt();
db.closeConn();

System.out.println("00000");
//out.println(request.getParameter("txtDptno"));
response.sendRedirect("success_failse.jsp?flag=1");
}
catch(Exception e)
{
	response.sendRedirect("success_failse.jsp?flag=0");
}
%>

